import os
 
a = 0
train_txt = open('train.txt','w')
val_txt = open('val.txt','w')
for i in os.listdir('JPEGImages'):
    a = a + 1
    if a < 24*0.8: #train
        print('/home/zhaoqb/A01/VOC/JPEGImages/' + i,file=train_txt,flush=True)
    else: #test
        print('/home/zhaoqb/A01/VOC/JPEGImages/' + i,file=val_txt,flush=True)

    
    
